package com.qianxun.module.application.rest;


import com.qianxun.module.application.service.DataSortQueryTableService;
import com.qianxun.module.base.constant.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;

/**
 * 排序信息前端处理器
 *
 * @author Admin
 */
@RequestMapping("/dataSort")
@RestController
public class DataSortController {

    @Resource
    private DataSortQueryTableService baseService;

    @RequestMapping("/queryAll")
    public Result queryAll(String appId, String dataType) {
        List<String> list = baseService.querySortList(appId, dataType);
        if (Objects.isNull(list) || list.size() == 0) {
            return Result.success(null, "暂无数据，请重试");
        }
        return Result.successList(list);
    }
}
